// 公共工具
export function sendCopc() {
  // 360归因
  if (sessionStorage.getItem("qhclickid")) {
    // console.log("360归因");
    axios("https://api.szcits.cn/so360.ocpc/upload", {
      params: {
        event: "ADVISORY_BUTTON", //类别
        qhclickid: sessionStorage.getItem("qhclickid"), //点击id
        data_industry: "ocpc_ps_convert",
      },
    });
    // 删除 qhclickid
    sessionStorage.removeItem("qhclickid");
  }

  // 百度归因
  if (sessionStorage.getItem("bd_vid")) {
    // console.log("百度归因");
    axios("https://api.szcits.cn/baidu.ocpc/upload", {
      params: {
        url: window.location.origin,
        bd_vid: sessionStorage.getItem("bd_vid"), //点击id
      },
    });
    // 删除 qhclickid
    sessionStorage.removeItem("bd_vid");
  }
}
